home *** CD-ROM | disk | FTP | other *** search
- /*--------------------------------------------------------------------------*/
- /* */
- /* */
- /* ------------ Bit-Bucket Software <no-Inc> */
- /* \ 10001101 / Writers and Distributors of */
- /* \ 011110 / No-Cost<no-tm> Software. */
- /* \ 1011 / */
- /* ------ */
- /* */
- /* Copyright (C) 1987, 1988, 1989 by Robert Hartman and Vincent Perriello */
- /* */
- /* */
- /* Box Drawing subroutines for BinkleyTerm 2.10 */
- /* */
- /* */
- /* For complete details of the licensing restrictions, please refer */
- /* to the License agreement, which is published in its entirety in */
- /* the MAKEFILE and BT.C, and also contained in the file LICENSE.210. */
- /* */
- /* USE OF THIS FILE IS SUBJECT TO THE RESTRICTIONS CONTAINED IN THE */
- /* BINKLEYTERM LICENSING AGREEMENT. IF YOU DO NOT FIND THE TEXT OF */
- /* THIS AGREEMENT IN ANY OF THE AFOREMENTIONED FILES, OR IF YOU DO */
- /* NOT HAVE THESE FILES, YOU SHOULD IMMEDIATELY CONTACT THE AUTHORS */
- /* AT THE ADDRESSES LISTED BELOW. IN NO EVENT SHOULD YOU PROCEED TO */
- /* USE THIS FILE WITHOUT HAVING ACCEPTED THE TERMS OF THE */
- /* BINKLEYTERM LICENSING AGREEMENT, OR SUCH OTHER AGREEMENT AS YOU */
- /* ARE ABLE TO REACH WITH THE AUTHORS. */
- /* */
- /* */
- /* The Authors can be reached at the following addresses: */
- /* */
- /* Robert C. Hartman Vincent E. Perriello */
- /* Spark Software VEP Software */
- /* 427-3 Amherst Street 111 Carroll Street */
- /* CS2032, Suite 232 Naugatuck, CT 06770 */
- /* Nashua, NH 03061 */
- /* */
- /* FidoNet 1:132/101 FidoNet 1:141/491 */
- /* Data (603) 888-8179 Data (203) 729-7569 */
- /* */
- /* Please feel free to contact us at any time to share your comments */
- /* about our software and/or licensing policies. */
- /* */
- /* */
- /* This module is derived from code developed by Augie Hansen in his */
- /* book "Proficient C" published by Microsoft Press. Mr. Hansen was */
- /* kind enough to give us verbal permission to use his routines, and */
- /* Bob, Vince and Alan (and all our full screen users) are grateful. */
- /* If you decide to use this code in some package you are doing, give */
- /* some thought to going out and buying the book. He deserves that. */
- /* */
- /*--------------------------------------------------------------------------*/
-
-
- #include "sbuf.h"
- #include "com.h"
- #include "xfer.h"
- #include "zmodem.h"
- #include "keybd.h"
- #include "sched.h"
- #include "externs.h"
- #include "prototyp.h"
-
-
- extern BUFFER Sbuf;
- extern CELLP Scrnbuf;
-
- int sb_wa (win, attr, n)
- REGIONP win;
- unsigned char attr;
- int n;
- {
- int i;
- int row;
- int col;
-
- i = n;
- row = win->r0 + win->row;
- col = win->c0 + win->col;
- while (i--)
- (Scrnbuf + row * SB_COLS + col + i)->b.attr = attr;
-
- /* marked the changed region */
- if (col < Sbuf.lcol[row])
- Sbuf.lcol[row] = col;
- if (col + n > Sbuf.rcol[row])
- Sbuf.rcol[row] = col + n;
-
- Sbuf.flags |= SB_DELTA;
-
- return ((i == 0) ? SB_OK : SB_ERR);
- }
-
- int sb_wc (win, ch, n)
- REGIONP win;
- unsigned char ch;
- int n;
- {
- int i;
- int row;
- int col;
-
- i = n;
- row = win->r0 + win->row;
- col = win->c0 + win->col;
- while (i--)
- (Scrnbuf + row * SB_COLS + col + i)->b.ch = ch;
-
- /* marked the changed region */
- if (col < Sbuf.lcol[row])
- Sbuf.lcol[row] = col;
- if (col + n > Sbuf.rcol[row])
- Sbuf.rcol[row] = col + n;
-
- Sbuf.flags |= SB_DELTA;
-
- return ((i == 0) ? SB_OK : SB_ERR);
- }
-
- int sb_wca (win, ch, attr, n)
- REGIONP win;
- unsigned char ch;
- unsigned char attr;
- int n;
- {
- int i;
- int row;
- int col;
- unsigned int ca;
-
- i = n;
- ca = (attr << 8) | ch;
- row = win->r0 + win->row;
- col = win->c0 + win->col;
- while (i--)
- (Scrnbuf + row * SB_COLS + col + i)->cap = ca;
-
- /* marked the changed region */
- if (col < Sbuf.lcol[row])
- Sbuf.lcol[row] = col;
- if (col + n > Sbuf.rcol[row])
- Sbuf.rcol[row] = col + n;
-
- Sbuf.flags |= SB_DELTA;
-
- return ((i == 0) ? SB_OK : SB_ERR);
- }
-